<!--<?php
print <<<EOT
-->
<base target="mainFrame">
<div id="overlay" style="position:absolute; z-index:3; background:#000000; opacity: 0.8; display:none; filter:alpha(opacity=60); -moz-opacity:.60; opacity:0.6">
</div>
<div id="lightbox" style="margin:150px auto; background:#FFFFFF; width:400px; height:300px; position:absolute; z-index:10; padding:10px; overflow:auto; line-height:180%; display:none;">

</div>
<div class="WarningMsg" id="notice" style="display:none;"></div>
<div class="m"></div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr class="tr4">
		<td>快捷操作</td>
		<td><input type="button" name="Submit" value="添加{$very[contentName]}" onclick="window.location='$admin_file?adminjob=edit&action=add';" class="btn" />
			&nbsp;&nbsp;
			<input type="button" name="Submit3" value="新建目录" onclick="window.location='$admin_file?adminjob=category&action=add';" class="btn" />
			&nbsp;&nbsp;
			<!--<input type="button" name="Submit2" value="更新首页" onclick="window.location='$admin_file?adminjob=category&action=pubindex';" class="btn" />
			&nbsp;&nbsp;-->
			<input type="button" name="Submit22" value="新增用户" onclick="window.location='$admin_file?adminjob=user&action=add';" class="btn" />
			&nbsp;&nbsp;
			<input type="button" name="Submit22" value="发布公告" onclick="window.location='$admin_file?adminjob=ext_notice&action=add';" class="btn" />
			&nbsp;&nbsp;
			<input type="button" name="Submit22" value="查看首页" onclick="window.open('index.php');" class="btn" />
			&nbsp;&nbsp;
			</td>
	</tr>
</table>
</div>
<div class="t">
<table width="100%" align=center cellpadding=0 cellspacing=0>
<tr class=head>
  <td colspan="2">
授权信息</td>
</tr>
<!--
<tr class=line>
  <td colspan="2">本资源管理系统由 北京市曙光计算机公司教育事业部 提供</td>
</tr>-->
<tr class=line>
  <td colspan="2">此程序被授权给<span style="color:#ff0000">{$licensInfo[client]}</span>使用，版本有效期：<span style="color:#ff0000">{$licensInfo['invalid']}</span>。程序最后更新时间：$wind_repair</td>
</tr>
<tr class=line>
  <td colspan="2">您的授权ID是：{$licensInfo[hardwareid]}</td>
</tr>
</table>
</div>
<div class="t">
<table width="100%" align=center cellpadding=0 cellspacing=0>
<tr class=head><td colspan="2">
统计信息</td></tr>
<tr class=line>
  <td width="20%">{$very[contentName]}总数：</td>
  <td width="80%">总计 $contentnum （其中今日新增 $todaynum 个{$very[contentName]}）</td>
</tr>
<tr class=line>
  <td>数据库占用：</td>
  <td>$pw_size M</td>
</tr>
<tr class=line>
  <td>存储空间占用：</td>
  <td>$filesize （共计 $filenum 个文件）</td>
</tr>
<!--
EOT;
if($very[convert]){
print <<<EOT
-->
<tr class=line>
  <td>转码信息：</td>
  <td>系统挂载了转码服务，当前共有 $waitnum 个视频文件正在转码队列中等待转码。</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
</div>

<div class="t">
<table width="100%" align=center cellpadding=0 cellspacing=0>
<tr class=head><td colspan="2">
环境检测</td></tr>
<tr class=line>
  <td width="20%">程序路径：</td>
  <td width="80%">$filepath</td>
</tr>
<tr class=line>
  <td>MySQL版本：</td>
  <td>$dbversion</td>
</tr>
<tr class=line>
  <td>Web服务器：</td>
  <td>$sysos</td>
</tr>
<tr class=line>
  <td>GD库版本：</td>
  <td>$gdinfo</td>
</tr>
<tr class=line>
  <td>宽字符集处理：</td>
  <td>$mbstring</td>
</tr>
<tr class=line>
  <td>照片信息识别：</td>
  <td>$exif</td>
</tr>
<tr class=line>
  <td>FreeType：</td>
  <td>$freetype</td>
</tr>
<tr class=line>
	<td>远程文件获取：</td>
	<td>$allowurl</td>
</tr>
<tr class=line>
  <td>最大上传限制：</td>
  <td>$max_upload</td>
</tr>
<tr class=line>
  <td>最大POST限制：</td>
  <td>$max_post (max_post 和 max_upload 共同影响最大可以上传文件的大小)</td>
</tr>
<tr class=line>
  <td>最大执行时间：</td>
  <td>$max_ex_time</td>
</tr>
<tr class=line>
  <td>服务器时间：</td>
  <td>$systemtime</td>
</tr>
</table>
</div>
<div class="t">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr class="head">
		<td colspan="2">产品说明</td>
		</tr>
	<tr class="line">
		<td width="20%">程序开发</td>
		<td width="80%">Aileen Guan, Piggio, Noizy, Joyqi, Dc., Liu Xiaoqing</td>
	</tr>
	<tr class="line">
		<td>界面设计</td>
		<td>Heiyo</td>
	</tr>
	<tr class="line">
		<td>功能策划</td>
		<td>Liu Wei,Wang Zhiqiang, </td>
	</tr>
</table>
</div>
<script language="javascript">

$.get("admin/update.php", {action:'connectTest',time:new Date().valueOf()}, 
function(data){
	if(data != 1)
	{
		$("#notice").fadeIn("slow");
		$("#notice").html(data);
	}
	else
	{
		//checkVersion();
	}
});

function checkVersion()
{
	$.get("admin/update.php",{action:'judgeversion', date:new Date().valueOf()}, function(data){if(data == 0){return false;} else {if(confirm("发现新版本(" + data + ")，需要开始自动更新吗？")){startUpdate();}};});
}

function IsNum2(s)   
{   
	var Number   =   "0123456789.";   
	for   (i   =   0;   i   <   s.length;i++)   
	{
		var c   =   s.charAt(i);   
		if(Number.indexOf(c)   ==   -1) return false;   
	}   
	return true;
}
 
function getUpdate()
{
	$.get("admin/update.php",{action:'getUpdate', date:new Date().valueOf()}, 
	function(data){
		if(data == 'OK') {
			$("#lightbox").append('全部更新已经完成，当前是最新版本.');
			setTimeout('finishUpdate()', 3000);
		} else if(!IsNum2(data)) {
			$("#lightbox").append('发生错误：<BR />' + data + '<BR />更新失败。');
			setTimeout('finishUpdate()', 5000);
		} else {
			$("#lightbox").append('正在更新' + data + '，现在进行下一步....<BR />');
			//$("#lightbox").append('数据库版本' + data + '更新已完成，现在进行下一步..<BR />');
			getUpdate();
		}
	}
	);
}

function startUpdate()
{
	var arrayPageSize = getPageSize();
	$("#overlay").css("height", arrayPageSize[1]);
	$("#overlay").css("width", arrayPageSize[0]);
	$("#lightbox").css("left", arrayPageSize[0]/2-200);
	//$("#overlay").show();
	$("#overlay").slideDown("fast");
	$("#lightbox").show();
	$("#lightbox").html('开始下载更新，请等待....<BR />');
	getUpdate();
	
}
/*
function unzipFile()
{
	$.get("admin/update.php",{action:'unzip', date:new Date().valueOf()}, 
	function(data){
		if(data == 'OK') {
			$("#lightbox").append('成功解压缩文件..<BR />');
			$("#lightbox").append('程序文件已经更新完毕..<BR />');
			$("#lightbox").append('开始准备更新数据库..<BR />');
			getUpdateSQL();
		} else {
			alert(data);
		}
	}
	);
}
*/

function finishUpdate()
{
	$("#overlay").slideUp("slow");
	$("#lightbox").hide();
}

function getPageSize() {
	 var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = window.innerWidth + window.scrollMaxX;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	
	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = xScroll;		
	} else {
		pageWidth = windowWidth;
	}

	return [pageWidth,pageHeight];
}
</script>
<!--
EOT;
?>-->